package cn.edu.lcu.cs.javateaching.net;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class GUIDemo {

	public static void main(String[] args) {

		
		JPanel panel1 = new JPanel();
		panel1.setBorder(BorderFactory.createLineBorder(Color.red, 3));
		panel1.setLayout(null);
		
		JLabel label1 = new JLabel("Enter Test URL&no.of.probes and click on Process" + "\r\n");
		JLabel label2 = new JLabel("Test URL");
		JComboBox<String> box = new JComboBox<String>();
		for (int i = 0; i < 5; i++) {
			box.addItem("" + i);
		}
//		box.setPreferredSize(new Dimension(60, 30));
		box.setBounds(30, 30, 30, 30);

		
		
		panel1.add(label1);
		panel1.add(label2);
		panel1.add(box);
		
		
		// 1.创建容器窗体
		JFrame frame = new JFrame("NetAnalyser V1.0");
		// 2.设置窗体的布局
		frame.setLayout(new GridLayout(1, 3));
		frame.setBounds(100, 100, 900, 400);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
		frame.add(panel1);
	}

}
